<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/


namespace Website\Controller;
use Think\Controller;
class IndexController extends Controller {
	
	public function indexAction(){
		$this->aboutAction();
	}

	public function aboutAction(){

		$this->assign('PATH',array('关于我们'));
		$this->assign('SEO',array('title'=>'关于我们','keywords'=>'关于我们','description'=>'关于我们'));
		
		$this->display();
	}
	
	public function contactAction(){

		$this->assign('PATH',array('联系我们'));
		$this->assign('SEO',array('title'=>'联系我们','keywords'=>'联系我们','description'=>'联系我们'));
		
		$this->display('Index/about');
	}
	
	public function serviceAction(){

		$this->assign('PATH',array('客服中心'));
		$this->assign('SEO',array('title'=>'客服中心','keywords'=>'客服中心','description'=>'客服中心'));
		
		$this->display('Index/about');
	}
	
	public function sitemapAction(){

		$this->assign('PATH',array('网站地图'));
		$this->assign('SEO',array('title'=>'网站地图','keywords'=>'网站地图','description'=>'网站地图'));
		
		$categoryarray=M('Category')->token(false)->where(" upid=0 ")->field('catid,upid,name,route,logo,nexts,task,service,news,help')->order('displayorder ASC')->select();
		if(!empty($categoryarray)){
			foreach($categoryarray as $key=>$value){
				$upid=$value['catid'];
				if($upid>0){
					$categoryarray[$key]['subclass']=M('Category')->token(false)->where(" upid=$upid ")->order('displayorder ASC')->field('catid,upid,name,route,logo,task,service,news,help')->select();
				}
			}
		}
		$this->assign('categoryarray',$categoryarray);
		
		$this->display('Index/about');
	}
	
	public function linksAction(){

		$this->assign('PATH',array('友情链接'));
		$this->assign('SEO',array('title'=>'友情链接','keywords'=>'友情链接','description'=>'友情链接'));
		
		$linklogo=M('Links')->where(" logo is not null ")->order('displayorder ASC')->select();
		$linktxt=M('Links')->where(" logo is null ")->order('displayorder ASC')->select();
		
		$this->assign('linklogo',$linklogo);
		$this->assign('linktxt',$linktxt);
		$this->display('Index/about');
	}
	
}